

/**
 * 会话存储
 * @param key
 * @param value
 */
export function setSessionStorage(key, obj) {
    return window.sessionStorage.setItem(key, obj)
}

/**
 * 获取会话存储
 * @param key
 * @returns {string | null}
 */
export function getSessionStorage(key) {
    return window.sessionStorage.getItem(key)
}

/**
 * 删除会话存储
 * @param key
 */
export function removeSessionStorage(key) {
    window.sessionStorage.removeItem(key)
}

/**
 * 清除所有会话存储
 */
export function clearSessionStorage() {
    window.sessionStorage.clear()
}

/**
 * 本地存储
 * @param key
 * @param obj
 */
export function setLocalStorage(key, obj) {
    return window.localStorage.setItem(key, obj)
}

/**
 * 获取本地存储
 * @param key
 * @returns {string | null}
 */
export function getLocalStorage(key) {
    return window.localStorage.getItem(key)
}

/**
 * 删除本地存储
 * @param key
 */
export function removeLocalStorage(key) {
    window.localStorage.removeItem(key)
}

/**
 * 清除所有本地存储
 */
export function clearLocalStorage() {
    window.localStorage.clear()
}